<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="js/jquery-3.0.0.js" ></script>
		<style>
		   div{border: solid 5px palegreen;}
		   ul{border: solid 4px deepskyblue;}
		   li,h1{border: solid 3px deeppink;}
		   a{border: solid 2px peru;}
		   span{border: solid 1px plum;}
		</style>
	</head>
	<body>
		<div>
			<ul>
				<li><a href="#">链接1</a></li>
				<h1><span>啊啊啊</span></h1>
				<li><a href="#">链接</a></li>
			</ul>
		</div>
	    <script>
	    	$("h1").next().css("border-color","gold")
	    	$("h1").prev().css("border-color","gold")
	    	$("h1").children().css("border-color","gold")
	    	$("h1").siblings().css("border-color","gold")
	    	$("div").parent().css("border-color","gold")
	    </script>
	</body>
</html>
